package com.lzp.aop.service.impl;

import com.lzp.aop.antion.MyAOP;
import com.lzp.aop.service.ExtendTestService;
import org.springframework.stereotype.Service;

/**
 * @author : lzp
 * @version 1.0
 * @date : 2022/8/25 15:11
 * @apiNote : TODO
 */
@Service("ExtendTestServiceImpl")
public class ExtendTestServiceImpl implements ExtendTestService {
    @Override
    @MyAOP
    public String testMethod(String string) {
        return "这是二号testMethod 有aop:"+string;
    }

    @Override
    public String testMethodThrow2(String num) {
        //这里将会抛出异常
        System.out.println("这是二号testMethodThrow2 无aop");
        int i=1/0;
       return "success";
    }
}
